package cn.kgc.taolun2.controller;

import cn.kgc.taolun2.pojo.ResultEntity;
import cn.kgc.taolun2.pojo.Sort;
import cn.kgc.taolun2.service.SortService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author shkstart
 * @create 2020-05-22 12:03
 */
@RestController
public class SortController {

    @Resource
    SortService sortService;

    //查询所有
    @RequestMapping("/selectAll")
    public ResultEntity<List<Sort>> selectAll(){
        List<Sort> sorts = sortService.selectSort();
        return ResultEntity.successWithoutData(sorts);
    }
}
